package demo1;

public class Out {
    public int num1 = 1;
    public void test() {
        //定义局部内部类
        class innerClass {
            int num2 = 10;
            void func() {
                System.out.println("调用局部内部类func方法");
            }
        }
        innerClass innerclass = new innerClass();
        System.out.println(innerclass.num2);
        innerclass.func();
    }
}
